<?php

namespace apiend\modules\business\controllers;

use Yii;
use apiend\components\Controller;

/**
 * 获取业务类型相关接口
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class TypeController extends Controller {

    public $modelClass = 'apiend\modules\business\models\BillTypeLogic';

    /**
     * @inheritdoc
     */
    protected function verbs() {
        return [
            '*' => ['GET'],
        ];
    }

    /**
     * 首页默认接口
     * @inheritdoc
     */
    public function actionIndex() {
        /* @var $model \apiend\modules\business\models\BillTypeLogic */
        $model = new $this->modelClass;
        $model->company_id = $this->unitid;
        $model->pagesize = false;
        return $model->search();
    }

}
